package cn.edu.neusoft.yuejian4.yuejian_4.service;


import android.app.Notification;
import android.os.Message;

import java.util.List;
import java.util.Observable;


import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Activity;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.HBanner;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Club;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.ClubClass;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.ClubVideo;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Master;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.MasterClass;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Order;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Recentgame;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Search;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.ShowComment;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.ShowUnitPic;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Signup;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Slideshow;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Success;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Train;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.User;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by Lix on 2018/10/7.
 */

public interface Service {

    //login
    @GET("index/index")
    Call<Success> login(
            @Query("name") String name,
            @Query("password") String password
    );

    @GET("index/userinfo")
    Call<User> userinfo(
            @Query("user_id") Integer user_id
    );

    //register
    @GET("index/register")
    Call<Success> register(
            @Query("name") String name,
            @Query("password") String password
    );

    //train
    @GET("train/lists")
    Call<List<Train>> alltrain();

    @GET("train/alists")
    Call<List<Train>> rumentrain();

    @GET("train/blists")
    Call<List<Train>> cainiaotrain();

    @GET("train/clists")
    Call<List<Train>> jinjietrain();


    @GET("train/details")
    Call<Train> train_detail(
            @Query("train_id") Integer train_id
    );

    //train sign up

    @GET("train/signup")
    Call<Signup> trainsignup(
            @Query("train_id") Integer train_id,
            @Query("user_id") Integer user_id
    );

    //train  jiesuan
    @GET("train/jiesuan")
    Call<Success> trainjiesuan(
            @Query("train_id") Integer train_id,
            @Query("user_id") Integer user_id,
            @Query("people_num") Integer people_num
    );

    //train iscollection
    @GET("train/iscollection")
    Call<Success> trainIsCollection(
            @Query("train_id") Integer train_id,
            @Query("user_id") Integer user_id
    );

    @GET("train/collection")
    Call<Success> trainCollection(
            @Query("train_id") Integer train_id,
            @Query("user_id") Integer user_id
    );

    @GET("train/uncollection")
    Call<Success> trainUnCollection(
            @Query("train_id") Integer train_id,
            @Query("user_id") Integer user_id
    );

    //club
    @GET("club/lists")
    Call<List<Club>> allclub();

    @GET("club/clubhot")
    Call<List<Club>> hotclub();

    @GET("club/distanceclub")
    Call<List<Club>> distanceclub();


    @GET("club/details")
    Call<Club> getClub(
            @Query("club_id") Integer club_id
    );

    @GET("club/isliked")
    Call<Success> isliked(
            @Query("club_id") Integer club_id,
            @Query("user_id") Integer user_id
    );

    @GET("club/like")
    Call<Success> likeclub(
            @Query("club_id") Integer club_id,
            @Query("user_id") Integer user_id
    );

    @GET("club/unlike")
    Call<Success> unlikeclub(
            @Query("club_id") Integer club_id,
            @Query("user_id") Integer user_id
    );

    @GET("club/class_list")
    Call<List<ClubClass>> curclubclass(
            @Query("club_id") Integer club_id
    );

    @GET("club/club_video")
    Call<List<ClubVideo>> curclubvideo(
            @Query("club_id") Integer club_id
    );


    //game
    @GET("recentgame/lists")
    Call<List<Recentgame>> allGame();

    @GET("recentgame/details")
    Call<Recentgame> getGame(
            @Query("game_id") Integer game_id
    );

    //activity
    @GET("activity/lists")
    Call<List<Activity>> allActivity();

    @GET("activity/details")
    Call<Activity> getActivity(
            @Query("activity_id") Integer activity_id
    );

    //activity iscollection
    @GET("activity/iscollection")
    Call<Success> iscollection(
            @Query("act_id") Integer act_id,
            @Query("user_id") Integer user_id
    );

    //activity collection
    @GET("activity/collection")
    Call<Success> collection(
            @Query("act_id") Integer act_id,
            @Query("user_id") Integer user_id
    );

    //activity uncollection
    @GET("activity/uncollection")
    Call<Success> uncollection(
            @Query("act_id") Integer act_id,
            @Query("user_id") Integer user_id
    );

    //activity signup
    @GET("activity/signup")
    Call<Signup> act_signup(
            @Query("act_id") Integer act_id,
            @Query("user_id") Integer user_id
    );

    //master
    @GET("master/lists")
    Call<List<Master>> allMaster();

    @GET("master/details")
    Call<Master> getMaster(
            @Query("mid") Integer mid
    );

    @GET("master/class_list")
    Call<List<MasterClass>> getMasterClass(
            @Query("mid") Integer mid
    );

    @GET("master/question")
    Call<List<Master>> getMasterQuestion(
            @Query("mid") Integer mid
    );


    //show
    @GET("slideshow/lists")
    Call<List<Slideshow>> allShow();

    @GET("slideshow/details")
    Call<Slideshow> getShow(
            @Query("show_id") Integer show_id
    );

    @GET("slideshow/comment")
    Call<List<ShowComment>> getComment(
            @Query("show_id") Integer show_id
    );

    //show fabu
    @GET("slideshow/fabu")
    Call<Success> fabu(
            @Query("uid") Integer uid,
            @Query("intro") String intro,
            @Query("pic") String pic
    );

    //show comment
    @GET("slideshow/fabuComment")
    Call<Success> subComment(
            @Query("user_id") Integer user_id,
            @Query("intro") String intro,
            @Query("sid") Integer sid
    );


    //my

    //my allorder
    @GET("my/order")
    Call<List<Order>> myallorder(
            @Query("user_id") Integer user_id
    );

    //my end order
    @GET("my/endorder")
    Call<List<Order>> endOrder(
            @Query("user_id") Integer user_id
    );

    //my wait order
    @GET("my/waitorder")
    Call<List<Order>> waitOrder(
            @Query("user_id") Integer user_id
    );

    //my del order
    @GET("my/delorder")
    Call<Success> delorder(
            @Query("oid") Integer oid
    );

    //my change order
    @GET("my/changeOrder")
    Call<Success> changeOrder(
            @Query("oid") Integer oid
    );

    //my like club
    @GET("my/like")
    Call<List<Club>> mylikeclub(
            @Query("user_id") Integer user_id
    );

    //my set headpic
    @Multipart
    @POST("my/update_pic")
     Call<Success> updateMyHeadPic(
            @Part("user_id") RequestBody user_id,
            @Part("pic") MultipartBody.Part pic
    );

    //my base set
    @GET("my/update_base")
    Call<Success> updateBase(
            @Query("user_id") Integer user_id,
            @Query("nickname") String nickname,
            @Query("realname") String realname,
            @Query("tel") Integer tel
    );

    //my update password
    @GET("my/update_pwd")
    Call<Success> updatePassword(
            @Query("user_id") Integer user_id,
            @Query("password") String password
    );

    //my slide
    @GET("my/slideshow")
    Call<List<Slideshow>> myshow(
            @Query("user_id") Integer user_id
    );

    //my del slide
    @GET("my/del_myshow")
    Call<Success> delMyShow(
            @Query("sid") Integer sid
    );

    //my collection train
    @GET("my/collectiontrain")
    Call<List<Train>> mycollTrain(
            @Query("user_id") Integer user_id
    );
    //my collection activity
    @GET("my/collectionact")
    Call<List<Activity>> mycollAct(
            @Query("user_id") Integer user_id
    );


    //banner
    @GET("banner/index")
    Call<List<HBanner>> getBanner();

    //search
    @GET("search/searchitem")
    Call<List<Search>> getSearch();
}
